import java.util.HashSet;

/**
* @description: leetCode 周赛303 t1
* @author hewei
* @date 2022/7/24 10:30
* @version 1.0
*/

public class RepeatedCharacter {

    public char repeatedCharacter(String s) {
        HashSet<Character> set = new HashSet<>();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (set.contains(c)) return c;
            set.add(c);
        }
        return 'a';
    }
}
